#include "subwidget.h"

SubWidget::SubWidget(QWidget *parent) : QWidget(parent) {
  this->setWindowTitle("boy");
  b.setParent(this);
  b.setText("切换到主窗口");
  connect(&b, &QPushButton::clicked, this, &SubWidget::sendSlot);

  resize(400, 300);  //定义窗口大小
}

void SubWidget::sendSlot() {
  emit mySignal();  //发送信号
  emit mySignal(250, "我是子窗口");
}
